< previous page page_106 next page >

Page 106
users from opening the database; and ReadOnly, which is used to prevent your program from modifying the data in the database.
· The Dynaset properties of the Visual Basic data control are Recordsource, which is used to select the data table within the database; and Options, which is used to set ReadOnly, DenyWrite, and AppendOnly properties to the Dynaset.
The Visual Basic data control has three database-related methods:
·Refresh updates the data control after setting properties.
·UpdateControls reads values from the fields in the Dynaset and writes those values to the related form controls.
·UpdateRecord reads values from the form controls and writes those values to the related fields in the Dynaset.
The Visual Basic data control has three database-related events:
·Reposition occurs each time the record pointer is moved to a new record in the Dynaset.
·Validate occurs each time the record pointer leaves the current record in the Dynaset.
·Error occurs each time a database error occurs.
The Visual Basic bound form controls can be used to link form input and display controls to data fields in the database.
· The bound textbox control is used for data entry on character and numeric data table fields.
· The bound label control is used for display-only character and numeric data table fields.
· The bound checkbox control is used for data entry on the Boolean data type field.
· The bound OLE control is used to display OLE objects stored directly in an MDB file by Microsoft Access.
· The Three-D panel control behaves the same as the label control; the Three-D checkbox control behaves the same as a standard checkbox control.
You have also learned the following general rules for creating Visual Basic forms in the Windows 95 style:
· The default color is light gray for backgrounds.
· The SSPanel control is used to create a palette on which to place all other controls.
· The default font is 8-point sans serif, nonbold.
· Input areas should have a white background, and display areas should have a light gray background. Also, display areas should be recessed into the input palette.

 
< previous page page_106 next page >

If you like this book, buy it!